package com.jetpackframework.request;

import com.jetpackframework.http.HttpTask;

import java.util.List;

public abstract class RequestCache<T> {
    protected List<T> caches;
    public void add(T task){
        caches.add(task);
    }

    public T get(){
        return caches.remove(0);
    }
    public boolean hasNext(){
        return !caches.isEmpty();
    }
}
